<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Stream_Api extends CI_Controller {

    public function index() {
        $this->load->helper(array('html'));

        $this->output->set_content_type('application/json');

        $data = $this->getMockStreamData();
        $this->output->set_output(json_encode($data));
    }

    function getMockStreamData() {
        $data = <<<DATA
            {"result" : [
                {
                    "item_id" : "1",
                    "content" : "For SNSs like StarChat, efficiency of first page / first time rendering is one key to UX. There.re some techniques and principles can enhance speed of page decoration, such as browser cache,  rendering strategy. We believe it meaningful to do a research among different browsers to figure out rendering efficiency of different FE rendering techniques. And that will bring some guideline to enhance StarChat FE architecture"
                },
                {
                    "item_id" : "2",
                    "content" : "We believe it meaningful to do a research among different browsers to figure out rendering efficiency of different FE rendering techniques. And that will bring some guideline to enhance StarChat FE architecture"
                },
                {
                    "item_id" : "3",
                    "content" : "For SNSs like StarChat, efficiency of first page / first time rendering is one key to UX. There.re some techniques and principles can enhance speed of page decoration, such as browser cache,  rendering strategy."
                },
                {
                    "item_id" : "4",
                    "content" : "For SNSs like StarChat, efficiency of first page / first time rendering is one key to UX. There.re some techniques and principles can enhance speed of page decoration, such as browser cache,  rendering strategy. And that will bring some guideline to enhance StarChat FE architecture"
                },
                {
                    "item_id" : "5",
                    "content" : "For SNSs like StarChat, efficiency of first page / first time rendering is one key to UX. There.re some techniques and principles can enhance speed of page decoration, such as browser cache,  rendering strategy. We believe it meaningful to do a research among different browsers to figure out rendering efficiency of different FE rendering techniques. And that will bring some guideline to enhance StarChat FE architecture"
                },
                {
                    "item_id" : "6",
                    "content" : "For SNSs like StarChat, efficiency of first page / first time rendering is one key to UX. There.re some techniques and principles can enhance speed of page decoration, such as browser cache,  rendering strategy. We believe it meaningful to do a research among different browsers to figure out rendering efficiency of different FE rendering techniques. And that will bring some guideline to enhance StarChat FE architecture"
                },
                {
                    "item_id" : "7",
                    "content" : "For SNSs like StarChat, efficiency of first page / first time rendering is one key to UX."
                }
            ]}
DATA;
        return json_decode($data)->{'result'};
    }
}
